<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@page session="true"%>
<%@page import="java.sql.ResultSet"%>
<!doctype html>
<%
                HttpSession sessionUser=request.getSession();
                String value = "";
                if(sessionUser.getAttribute("result") != null){
                    ResultSet res=(ResultSet)sessionUser.getAttribute("result");
                    value = res.getString(4);
                }
%>

<html>
    <head>
        <title></title>        
        <link rel="stylesheet" type="text/css" href="../styles/calendario/jquery.ui.all.css" />
        <link rel="stylesheet" type="text/css" href="../styles/calendario/demos.css" />
        <link rel="stylesheet" type="text/css" href="../styles/tickets.css" />

        <script type="text/javascript" src="../js/ajax.js"></script>
        <script type="text/javascript" src="../js/validations.js"></script>
        <script type="text/javascript" src="../js/tickets.js"></script>
        <script language="javascript" type="text/javascript" src="../js/jquery/calendar/jquery-1.4.2.js"></script>
        <script language="javascript" type="text/javascript" src="../js/jquery/calendar/jquery.ui.core.js"></script>
        <script language="javascript" type="text/javascript" src="../js/jquery/calendar/jquery.ui.widget.js"></script>
        <script language="javascript" type="text/javascript" src="../js/jquery/calendar/jquery.ui.datepicker.js"></script>
        <script type="text/javascript" language="javascript" src="../js/login.js"></script>

        <link href="../js/jquery/alerts/jquery.alerts.css" rel="stylesheet" type="text/css" />      
        <script type="text/javascript" src="../js/jquery/alerts/jquery.alerts.js"></script>
        
        <script type="text/javascript">
            $(function() {
                $("#txtDate").datepicker();
            });            
        </script>
    </head>
    <body onload="loadInformation()">
        <p></p>
       <div id="loged"<%
        if(sessionUser.getAttribute("result") != null){%>
        style="display: block;"
             <%}else{%>
              <%}%>style="display: none;">
             <input type="text" class="fieldUser" readonly id="txtUser" value="<%=value%>"/><span>&nbsp; &nbsp; | &nbsp; &nbsp;</span>
            <input type="button" id="logoutUser" value="Cerrar Sesión" class="button_form" onclick="btnLogout_onclick()">
        </div>
            <p></p>
        <div id="selection" class="selection">
            <center> <label class="fieldtext">Diagrama de distribuci&oacute;n</label></center>
            <table class="board">
                <tr>
                    <td id="00" class="boxStyleSold"></td>
                    <td id="01" class="boxStyleSold"></td>
                    <td></td>
                    <td></td>
                    <td></td>
                </tr>
                <tr>
                    <td id="02" class="boxStyleAvailable" onclick="viewNumber(02)"></td>
                    <td id="03" class="boxStyleAvailable" onclick="viewNumber(03)"></td>
                    <td></td>
                    <td id="04" class="boxStyleAvailable" onclick="viewNumber(04)"></td>
                    <td id="05" class="boxStyleAvailable" onclick="viewNumber(05)"></td>
                </tr>
                <tr>
                    <td id="06" class="boxStyleAvailable" onclick="viewNumber(06)"></td>
                    <td id="07" class="boxStyleAvailable" onclick="viewNumber(07)"></td>
                    <td></td>
                    <td id="08" class="boxStyleAvailable" onclick="viewNumber(08)"></td>
                    <td id="09" class="boxStyleAvailable" onclick="viewNumber(09)"></td>
                </tr>
                <tr>
                    <td id="10" class="boxStyleAvailable" onclick="viewNumber(10)"></td>
                    <td id="11" class="boxStyleAvailable" onclick="viewNumber(11)"></td>
                    <td></td>
                    <td id="12" class="boxStyleAvailable" onclick="viewNumber(12)"></td>
                    <td id="13" class="boxStyleAvailable" onclick="viewNumber(13)"></td>
                </tr>
                <tr>
                    <td id="14" class="boxStyleAvailable" onclick="viewNumber(14)"></td>
                    <td id="15" class="boxStyleAvailable" onclick="viewNumber(15)"></td>
                    <td></td>
                    <td id="16" class="boxStyleAvailable" onclick="viewNumber(16)"></td>
                    <td id="17" class="boxStyleAvailable" onclick="viewNumber(17)"></td>
                </tr>
                <tr>
                    <td id="18" class="boxStyleAvailable" onclick="viewNumber(18)"></td>
                    <td id="19" class="boxStyleAvailable" onclick="viewNumber(19)"></td>
                    <td></td>
                    <td id="20" class="boxStyleAvailable" onclick="viewNumber(20)"></td>
                    <td id="21" class="boxStyleAvailable" onclick="viewNumber(21)"></td>
                </tr>
                <tr>
                    <td id="22" class="boxStyleAvailable" onclick="viewNumber(22)"></td>
                    <td id="23" class="boxStyleAvailable" onclick="viewNumber(23)"></td>
                    <td></td>
                    <td id="24" class="boxStyleAvailable" onclick="viewNumber(24)"></td>
                    <td id="25" class="boxStyleAvailable" onclick="viewNumber(25)"></td>
                </tr>
                <tr>
                    <td id="26" class="boxStyleAvailable" onclick="viewNumber(26)"></td>
                    <td id="27" class="boxStyleAvailable" onclick="viewNumber(27)"></td>
                    <td></td>
                    <td id="28" class="boxStyleAvailable" onclick="viewNumber(28)"></td>
                    <td id="29" class="boxStyleAvailable" onclick="viewNumber(29)"></td>
                </tr>
            </table>
        </div>
        <div id="form" class="form">
            <table>
                <tr>
                    <td colspan="2"> <p></p></td>
                </tr>
                <tr>
                    <td colspan="2"><center> <p><label class="fieldTitle">Selecci&oacute;n de Rutas</label></p></center></td>
                </tr>
                 <tr>
                    <td><label class="fieldtext">Fecha: </label></td><td><input type="text" id="txtDate" class="fieldtext"/></td>
                </tr>
                <tr>
                    <td><label class="fieldtext">Ciudad origen:</label> </td><td><select id="selSource" class="selCities"><option>Seleccione</option></select></td>
                </tr>
                <tr>
                    <td><label class="fieldtext">Ciudad destino: </label></td><td><select id="selFinal" class="selCities" onmouseout="getHour()"><option>Seleccione</option></select></td>
                </tr>               
                <tr>
                    <td><label class="fieldtext">Horario:</label> </td><td><select id="txtHour" class="selCities"><option>Seleccione</option></select></td>
                </tr>                                
                <tr>
                    <td colspan="2"><center><input id="btnSearch" type="button" value="Buscar" class="button_form" onclick="findTravel()" onkeypress="if(event.keyCode==13){findTravel();}"/></center></td>
                </tr>

            </table>
        </div>

         <div id="formR" class="form">
            <table>
                 <tr>
                    <td colspan="2"> <p> &nbsp;</p></td>
                </tr>
                 <tr>
                     <td colspan="2"> <p><label class="fieldtext">Por favor seleccione una ubicaci&oacute;n en el diagrama de distribuci&oacute;n</label></p></td>
                </tr>
                <tr>
                    <td><label class="fieldtext">Ubicaci&oacute;n: </label> </td><td><input type="text" id="txtPlace" class="fieldtext" readonly /></td>
                </tr>                               
                <tr>
                    <td colspan="2"><center><input id="btnReserved" type="button" value="Reservar" class="button_form" onclick="makeReservation()" onkeypress="if(event.keyCode==13){makeReservation();}"/></center></td>
                </tr>

            </table>
        </div>
    </body>
</html>
